Integrand size = 25, antiderivative size = 128 \[ \int \frac {\tan ^2(e+f x)}{\left (a+b \tan ^2(e+f x)\right )^{5/2}} \, dx=-\frac {\arctan \left (\frac {\sqrt {a-b} \tan (e+f x)}{\sqrt {a+b \tan ^2(e+f x)}}\right )}{(a-b)^{5/2} f}+\frac {\tan (e+f x)}{3 (a-b) f \left (a+b \tan ^2(e+f x)\right )^{3/2}}+\frac {(2 a+b) \tan (e+f x)}{3 a (a-b)^2 f \sqrt {a+b \tan ^2(e+f x)}} \]
-arctan((a-b)^(1/2)*tan(f*x+e)/(a+b*tan(f*x+e)^2)^(1/2))/(a-b)^(5/2)/f+1/3 *(2*a+b)*tan(f*x+e)/a/(a-b)^2/f/(a+b*tan(f*x+e)^2)^(1/2)+1/3*tan(f*x+e)/(a -b)/f/(a+b*tan(f*x+e)^2)^(3/2)
Result contains higher order function than in optimal. Order 5 vs. order 3 in optimal.
Time = 7.82 (sec) , antiderivative size = 305, normalized size of antiderivative = 2.38 \[ \int \frac {\tan ^2(e+f x)}{\left (a+b \tan ^2(e+f x)\right )^{5/2}} \, dx=\frac {\sin ^2(e+f x) \tan (e+f x) \left (\frac {4 (a-b) \operatorname {Hypergeometric2F1}\left (2,2,\frac {9}{2},\frac {(a-b) \sin ^2(e+f x)}{a}\right ) \sin ^2(e+f x) \left (a+b \tan ^2(e+f x)\right )}{35 a^2}+\frac {\cot ^4(e+f x) \left (5 a+2 b \tan ^2(e+f x)\right ) \left (3 \arcsin \left (\sqrt {\frac {(a-b) \sin ^2(e+f x)}{a}}\right ) \left (a+b \tan ^2(e+f x)\right )^2+a \sec ^2(e+f x) \sqrt {\frac {(a-b) \cos ^2(e+f x) \sin ^2(e+f x) \left (a+b \tan ^2(e+f x)\right )}{a^2}} \left (-4 b \tan ^2(e+f x)+a \left (-3+\tan ^2(e+f x)\right )\right )\right )}{3 a (a-b)^2 \sqrt {\frac {(a-b) \cos ^2(e+f x) \sin ^2(e+f x) \left (a+b \tan ^2(e+f x)\right )}{a^2}}}\right )}{3 a^2 f \sqrt {a+b \tan ^2(e+f x)} \left (1+\frac {b \tan ^2(e+f x)}{a}\right )} \]
(Sin[e + f*x]^2*Tan[e + f*x]*((4*(a - b)*Hypergeometric2F1[2, 2, 9/2, ((a - b)*Sin[e + f*x]^2)/a]*Sin[e + f*x]^2*(a + b*Tan[e + f*x]^2))/(35*a^2) + (Cot[e + f*x]^4*(5*a + 2*b*Tan[e + f*x]^2)*(3*ArcSin[Sqrt[((a - b)*Sin[e + f*x]^2)/a]]*(a + b*Tan[e + f*x]^2)^2 + a*Sec[e + f*x]^2*Sqrt[((a - b)*Cos [e + f*x]^2*Sin[e + f*x]^2*(a + b*Tan[e + f*x]^2))/a^2]*(-4*b*Tan[e + f*x] ^2 + a*(-3 + Tan[e + f*x]^2))))/(3*a*(a - b)^2*Sqrt[((a - b)*Cos[e + f*x]^ 2*Sin[e + f*x]^2*(a + b*Tan[e + f*x]^2))/a^2])))/(3*a^2*f*Sqrt[a + b*Tan[e + f*x]^2]*(1 + (b*Tan[e + f*x]^2)/a))
Time = 0.32 (sec) , antiderivative size = 133, normalized size of antiderivative = 1.04, number of steps used = 8, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.280, Rules used = {3042, 4153, 373, 402, 27, 291, 216}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {\tan ^2(e+f x)}{\left (a+b \tan ^2(e+f x)\right )^{5/2}} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\tan (e+f x)^2}{\left (a+b \tan (e+f x)^2\right )^{5/2}}dx\) |
\(\Big \downarrow \) 4153 |
\(\displaystyle \frac {\int \frac {\tan ^2(e+f x)}{\left (\tan ^2(e+f x)+1\right ) \left (b \tan ^2(e+f x)+a\right )^{5/2}}d\tan (e+f x)}{f}\) |
\(\Big \downarrow \) 373 |
\(\displaystyle \frac {\frac {\tan (e+f x)}{3 (a-b) \left (a+b \tan ^2(e+f x)\right )^{3/2}}-\frac {\int \frac {1-2 \tan ^2(e+f x)}{\left (\tan ^2(e+f x)+1\right ) \left (b \tan ^2(e+f x)+a\right )^{3/2}}d\tan (e+f x)}{3 (a-b)}}{f}\) |
\(\Big \downarrow \) 402 |
\(\displaystyle \frac {\frac {\tan (e+f x)}{3 (a-b) \left (a+b \tan ^2(e+f x)\right )^{3/2}}-\frac {\frac {\int \frac {3 a}{\left (\tan ^2(e+f x)+1\right ) \sqrt {b \tan ^2(e+f x)+a}}d\tan (e+f x)}{a (a-b)}-\frac {(2 a+b) \tan (e+f x)}{a (a-b) \sqrt {a+b \tan ^2(e+f x)}}}{3 (a-b)}}{f}\) |
\(\Big \downarrow \) 27 |
\(\displaystyle \frac {\frac {\tan (e+f x)}{3 (a-b) \left (a+b \tan ^2(e+f x)\right )^{3/2}}-\frac {\frac {3 \int \frac {1}{\left (\tan ^2(e+f x)+1\right ) \sqrt {b \tan ^2(e+f x)+a}}d\tan (e+f x)}{a-b}-\frac {(2 a+b) \tan (e+f x)}{a (a-b) \sqrt {a+b \tan ^2(e+f x)}}}{3 (a-b)}}{f}\) |
\(\Big \downarrow \) 291 |
\(\displaystyle \frac {\frac {\tan (e+f x)}{3 (a-b) \left (a+b \tan ^2(e+f x)\right )^{3/2}}-\frac {\frac {3 \int \frac {1}{1-\frac {(b-a) \tan ^2(e+f x)}{b \tan ^2(e+f x)+a}}d\frac {\tan (e+f x)}{\sqrt {b \tan ^2(e+f x)+a}}}{a-b}-\frac {(2 a+b) \tan (e+f x)}{a (a-b) \sqrt {a+b \tan ^2(e+f x)}}}{3 (a-b)}}{f}\) |
\(\Big \downarrow \) 216 |
\(\displaystyle \frac {\frac {\tan (e+f x)}{3 (a-b) \left (a+b \tan ^2(e+f x)\right )^{3/2}}-\frac {\frac {3 \arctan \left (\frac {\sqrt {a-b} \tan (e+f x)}{\sqrt {a+b \tan ^2(e+f x)}}\right )}{(a-b)^{3/2}}-\frac {(2 a+b) \tan (e+f x)}{a (a-b) \sqrt {a+b \tan ^2(e+f x)}}}{3 (a-b)}}{f}\) |
(Tan[e + f*x]/(3*(a - b)*(a + b*Tan[e + f*x]^2)^(3/2)) - ((3*ArcTan[(Sqrt[ a - b]*Tan[e + f*x])/Sqrt[a + b*Tan[e + f*x]^2]])/(a - b)^(3/2) - ((2*a + b)*Tan[e + f*x])/(a*(a - b)*Sqrt[a + b*Tan[e + f*x]^2]))/(3*(a - b)))/f
3.4.54.3.1 Defintions of rubi rules used
Int[(a_)*(Fx_), x_Symbol] :> Simp[a Int[Fx, x], x] /; FreeQ[a, x] && !Ma tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[b, 2]))*A rcTan[Rt[b, 2]*(x/Rt[a, 2])], x] /; FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a , 0] || GtQ[b, 0])
Int[1/(Sqrt[(a_) + (b_.)*(x_)^2]*((c_) + (d_.)*(x_)^2)), x_Symbol] :> Subst [Int[1/(c - (b*c - a*d)*x^2), x], x, x/Sqrt[a + b*x^2]] /; FreeQ[{a, b, c, d}, x] && NeQ[b*c - a*d, 0]
Int[((e_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^2)^(p_)*((c_) + (d_.)*(x_)^2)^(q_ ), x_Symbol] :> Simp[e*(e*x)^(m - 1)*(a + b*x^2)^(p + 1)*((c + d*x^2)^(q + 1)/(2*(b*c - a*d)*(p + 1))), x] - Simp[e^2/(2*(b*c - a*d)*(p + 1)) Int[(e *x)^(m - 2)*(a + b*x^2)^(p + 1)*(c + d*x^2)^q*Simp[c*(m - 1) + d*(m + 2*p + 2*q + 3)*x^2, x], x], x] /; FreeQ[{a, b, c, d, e, q}, x] && NeQ[b*c - a*d, 0] && LtQ[p, -1] && GtQ[m, 1] && LeQ[m, 3] && IntBinomialQ[a, b, c, d, e, m, 2, p, q, x]
Int[((a_) + (b_.)*(x_)^2)^(p_)*((c_) + (d_.)*(x_)^2)^(q_.)*((e_) + (f_.)*(x _)^2), x_Symbol] :> Simp[(-(b*e - a*f))*x*(a + b*x^2)^(p + 1)*((c + d*x^2)^ (q + 1)/(a*2*(b*c - a*d)*(p + 1))), x] + Simp[1/(a*2*(b*c - a*d)*(p + 1)) Int[(a + b*x^2)^(p + 1)*(c + d*x^2)^q*Simp[c*(b*e - a*f) + e*2*(b*c - a*d) *(p + 1) + d*(b*e - a*f)*(2*(p + q + 2) + 1)*x^2, x], x], x] /; FreeQ[{a, b , c, d, e, f, q}, x] && LtQ[p, -1]
Int[((d_.)*tan[(e_.) + (f_.)*(x_)])^(m_.)*((a_) + (b_.)*((c_.)*tan[(e_.) + (f_.)*(x_)])^(n_))^(p_.), x_Symbol] :> With[{ff = FreeFactors[Tan[e + f*x], x]}, Simp[c*(ff/f) Subst[Int[(d*ff*(x/c))^m*((a + b*(ff*x)^n)^p/(c^2 + f f^2*x^2)), x], x, c*(Tan[e + f*x]/ff)], x]] /; FreeQ[{a, b, c, d, e, f, m, n, p}, x] && (IGtQ[p, 0] || EqQ[n, 2] || EqQ[n, 4] || (IntegerQ[p] && Ratio nalQ[n]))
Time = 0.07 (sec) , antiderivative size = 212, normalized size of antiderivative = 1.66
method | result | size |
derivativedivides | \(\frac {\frac {\tan \left (f x +e \right )}{3 a \left (a +b \tan \left (f x +e \right )^{2}\right )^{\frac {3}{2}}}+\frac {2 \tan \left (f x +e \right )}{3 a^{2} \sqrt {a +b \tan \left (f x +e \right )^{2}}}-\frac {\sqrt {b^{4} \left (a -b \right )}\, \arctan \left (\frac {b^{2} \left (a -b \right ) \tan \left (f x +e \right )}{\sqrt {b^{4} \left (a -b \right )}\, \sqrt {a +b \tan \left (f x +e \right )^{2}}}\right )}{\left (a -b \right )^{3} b^{2}}+\frac {b \tan \left (f x +e \right )}{\left (a -b \right )^{2} a \sqrt {a +b \tan \left (f x +e \right )^{2}}}+\frac {b \left (\frac {\tan \left (f x +e \right )}{3 a \left (a +b \tan \left (f x +e \right )^{2}\right )^{\frac {3}{2}}}+\frac {2 \tan \left (f x +e \right )}{3 a^{2} \sqrt {a +b \tan \left (f x +e \right )^{2}}}\right )}{a -b}}{f}\) | \(212\) |
default | \(\frac {\frac {\tan \left (f x +e \right )}{3 a \left (a +b \tan \left (f x +e \right )^{2}\right )^{\frac {3}{2}}}+\frac {2 \tan \left (f x +e \right )}{3 a^{2} \sqrt {a +b \tan \left (f x +e \right )^{2}}}-\frac {\sqrt {b^{4} \left (a -b \right )}\, \arctan \left (\frac {b^{2} \left (a -b \right ) \tan \left (f x +e \right )}{\sqrt {b^{4} \left (a -b \right )}\, \sqrt {a +b \tan \left (f x +e \right )^{2}}}\right )}{\left (a -b \right )^{3} b^{2}}+\frac {b \tan \left (f x +e \right )}{\left (a -b \right )^{2} a \sqrt {a +b \tan \left (f x +e \right )^{2}}}+\frac {b \left (\frac {\tan \left (f x +e \right )}{3 a \left (a +b \tan \left (f x +e \right )^{2}\right )^{\frac {3}{2}}}+\frac {2 \tan \left (f x +e \right )}{3 a^{2} \sqrt {a +b \tan \left (f x +e \right )^{2}}}\right )}{a -b}}{f}\) | \(212\) |
1/f*(1/3*tan(f*x+e)/a/(a+b*tan(f*x+e)^2)^(3/2)+2/3/a^2*tan(f*x+e)/(a+b*tan (f*x+e)^2)^(1/2)-1/(a-b)^3*(b^4*(a-b))^(1/2)/b^2*arctan(b^2*(a-b)/(b^4*(a- b))^(1/2)/(a+b*tan(f*x+e)^2)^(1/2)*tan(f*x+e))+b/(a-b)^2*tan(f*x+e)/a/(a+b *tan(f*x+e)^2)^(1/2)+b/(a-b)*(1/3*tan(f*x+e)/a/(a+b*tan(f*x+e)^2)^(3/2)+2/ 3/a^2*tan(f*x+e)/(a+b*tan(f*x+e)^2)^(1/2)))
Leaf count of result is larger than twice the leaf count of optimal. 249 vs. \(2 (114) = 228\).
Time = 0.32 (sec) , antiderivative size = 529, normalized size of antiderivative = 4.13 \[ \int \frac {\tan ^2(e+f x)}{\left (a+b \tan ^2(e+f x)\right )^{5/2}} \, dx=\left [-\frac {3 \, {\left (a b^{2} \tan \left (f x + e\right )^{4} + 2 \, a^{2} b \tan \left (f x + e\right )^{2} + a^{3}\right )} \sqrt {-a + b} \log \left (-\frac {{\left (a - 2 \, b\right )} \tan \left (f x + e\right )^{2} + 2 \, \sqrt {b \tan \left (f x + e\right )^{2} + a} \sqrt {-a + b} \tan \left (f x + e\right ) - a}{\tan \left (f x + e\right )^{2} + 1}\right ) - 2 \, {\left ({\left (2 \, a^{2} b - a b^{2} - b^{3}\right )} \tan \left (f x + e\right )^{3} + 3 \, {\left (a^{3} - a^{2} b\right )} \tan \left (f x + e\right )\right )} \sqrt {b \tan \left (f x + e\right )^{2} + a}}{6 \, {\left ({\left (a^{4} b^{2} - 3 \, a^{3} b^{3} + 3 \, a^{2} b^{4} - a b^{5}\right )} f \tan \left (f x + e\right )^{4} + 2 \, {\left (a^{5} b - 3 \, a^{4} b^{2} + 3 \, a^{3} b^{3} - a^{2} b^{4}\right )} f \tan \left (f x + e\right )^{2} + {\left (a^{6} - 3 \, a^{5} b + 3 \, a^{4} b^{2} - a^{3} b^{3}\right )} f\right )}}, -\frac {3 \, {\left (a b^{2} \tan \left (f x + e\right )^{4} + 2 \, a^{2} b \tan \left (f x + e\right )^{2} + a^{3}\right )} \sqrt {a - b} \arctan \left (-\frac {\sqrt {b \tan \left (f x + e\right )^{2} + a}}{\sqrt {a - b} \tan \left (f x + e\right )}\right ) - {\left ({\left (2 \, a^{2} b - a b^{2} - b^{3}\right )} \tan \left (f x + e\right )^{3} + 3 \, {\left (a^{3} - a^{2} b\right )} \tan \left (f x + e\right )\right )} \sqrt {b \tan \left (f x + e\right )^{2} + a}}{3 \, {\left ({\left (a^{4} b^{2} - 3 \, a^{3} b^{3} + 3 \, a^{2} b^{4} - a b^{5}\right )} f \tan \left (f x + e\right )^{4} + 2 \, {\left (a^{5} b - 3 \, a^{4} b^{2} + 3 \, a^{3} b^{3} - a^{2} b^{4}\right )} f \tan \left (f x + e\right )^{2} + {\left (a^{6} - 3 \, a^{5} b + 3 \, a^{4} b^{2} - a^{3} b^{3}\right )} f\right )}}\right ] \]
[-1/6*(3*(a*b^2*tan(f*x + e)^4 + 2*a^2*b*tan(f*x + e)^2 + a^3)*sqrt(-a + b )*log(-((a - 2*b)*tan(f*x + e)^2 + 2*sqrt(b*tan(f*x + e)^2 + a)*sqrt(-a + b)*tan(f*x + e) - a)/(tan(f*x + e)^2 + 1)) - 2*((2*a^2*b - a*b^2 - b^3)*ta n(f*x + e)^3 + 3*(a^3 - a^2*b)*tan(f*x + e))*sqrt(b*tan(f*x + e)^2 + a))/( (a^4*b^2 - 3*a^3*b^3 + 3*a^2*b^4 - a*b^5)*f*tan(f*x + e)^4 + 2*(a^5*b - 3* a^4*b^2 + 3*a^3*b^3 - a^2*b^4)*f*tan(f*x + e)^2 + (a^6 - 3*a^5*b + 3*a^4*b ^2 - a^3*b^3)*f), -1/3*(3*(a*b^2*tan(f*x + e)^4 + 2*a^2*b*tan(f*x + e)^2 + a^3)*sqrt(a - b)*arctan(-sqrt(b*tan(f*x + e)^2 + a)/(sqrt(a - b)*tan(f*x + e))) - ((2*a^2*b - a*b^2 - b^3)*tan(f*x + e)^3 + 3*(a^3 - a^2*b)*tan(f*x + e))*sqrt(b*tan(f*x + e)^2 + a))/((a^4*b^2 - 3*a^3*b^3 + 3*a^2*b^4 - a*b ^5)*f*tan(f*x + e)^4 + 2*(a^5*b - 3*a^4*b^2 + 3*a^3*b^3 - a^2*b^4)*f*tan(f *x + e)^2 + (a^6 - 3*a^5*b + 3*a^4*b^2 - a^3*b^3)*f)]
\[ \int \frac {\tan ^2(e+f x)}{\left (a+b \tan ^2(e+f x)\right )^{5/2}} \, dx=\int \frac {\tan ^{2}{\left (e + f x \right )}}{\left (a + b \tan ^{2}{\left (e + f x \right )}\right )^{\frac {5}{2}}}\, dx \]
Exception generated. \[ \int \frac {\tan ^2(e+f x)}{\left (a+b \tan ^2(e+f x)\right )^{5/2}} \, dx=\text {Exception raised: ValueError} \]
Exception raised: ValueError >> Computation failed since Maxima requested additional constraints; using the 'assume' command before evaluation *may* help (example of legal syntax is 'assume(b-a>0)', see `assume?` for more details)Is
Timed out. \[ \int \frac {\tan ^2(e+f x)}{\left (a+b \tan ^2(e+f x)\right )^{5/2}} \, dx=\text {Timed out} \]
Timed out. \[ \int \frac {\tan ^2(e+f x)}{\left (a+b \tan ^2(e+f x)\right )^{5/2}} \, dx=\int \frac {{\mathrm {tan}\left (e+f\,x\right )}^2}{{\left (b\,{\mathrm {tan}\left (e+f\,x\right )}^2+a\right )}^{5/2}} \,d x \]